# -*- coding: utf-8 -*-
#
# Copyright (c) ZeroC, Inc. All rights reserved.
#
#
# Ice version 3.7.3
#
# <auto-generated>
#
# Generated from file `JudgeInterface.ice'
#
# Warning: do not edit this file.
#
# </auto-generated>
#

from sys import version_info as _version_info_
import Ice, IcePy

# Start of module ACJudge_Pkg.OJMod
_M_ACJudge_Pkg = Ice.openModule('ACJudge_Pkg')
_M_ACJudge_Pkg.OJMod = Ice.openModule('ACJudge_Pkg.OJMod')
__name__ = 'ACJudge_Pkg.OJMod'

if 'Problem' not in _M_ACJudge_Pkg.OJMod.__dict__:
    _M_ACJudge_Pkg.OJMod.Problem = Ice.createTempClass()
    class Problem(object):
        def __init__(self, id=0, title=''):
            self.id = id
            self.title = title

        def __hash__(self):
            _h = 0
            _h = 5 * _h + Ice.getHash(self.id)
            _h = 5 * _h + Ice.getHash(self.title)
            return _h % 0x7fffffff

        def __compare(self, other):
            if other is None:
                return 1
            elif not isinstance(other, _M_ACJudge_Pkg.OJMod.Problem):
                return NotImplemented
            else:
                if self.id is None or other.id is None:
                    if self.id != other.id:
                        return (-1 if self.id is None else 1)
                else:
                    if self.id < other.id:
                        return -1
                    elif self.id > other.id:
                        return 1
                if self.title is None or other.title is None:
                    if self.title != other.title:
                        return (-1 if self.title is None else 1)
                else:
                    if self.title < other.title:
                        return -1
                    elif self.title > other.title:
                        return 1
                return 0

        def __lt__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r < 0

        def __le__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r <= 0

        def __gt__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r > 0

        def __ge__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r >= 0

        def __eq__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r == 0

        def __ne__(self, other):
            r = self.__compare(other)
            if r is NotImplemented:
                return r
            else:
                return r != 0

        def __str__(self):
            return IcePy.stringify(self, _M_ACJudge_Pkg.OJMod._t_Problem)

        __repr__ = __str__

    _M_ACJudge_Pkg.OJMod._t_Problem = IcePy.defineStruct('::OJMod::Problem', Problem, (), (
        ('id', (), IcePy._t_int),
        ('title', (), IcePy._t_string)
    ))

    _M_ACJudge_Pkg.OJMod.Problem = Problem
    del Problem

if 'Results' not in _M_ACJudge_Pkg.OJMod.__dict__:
    _M_ACJudge_Pkg.OJMod.Results = Ice.createTempClass()
    class Results(Ice.EnumBase):

        def __init__(self, _n, _v):
            Ice.EnumBase.__init__(self, _n, _v)

        def valueOf(self, _n):
            if _n in self._enumerators:
                return self._enumerators[_n]
            return None
        valueOf = classmethod(valueOf)

    Results.A = Results("A", 0)
    Results.TLE = Results("TLE", 1)
    Results.WA = Results("WA", 2)
    Results.CE = Results("CE", 3)
    Results.MLE = Results("MLE", 4)
    Results.RE = Results("RE", 5)
    Results._enumerators = { 0:Results.A, 1:Results.TLE, 2:Results.WA, 3:Results.CE, 4:Results.MLE, 5:Results.RE }

    _M_ACJudge_Pkg.OJMod._t_Results = IcePy.defineEnum('::OJMod::Results', Results, (), Results._enumerators)

    _M_ACJudge_Pkg.OJMod.Results = Results
    del Results

if 'SupportedLanguages' not in _M_ACJudge_Pkg.OJMod.__dict__:
    _M_ACJudge_Pkg.OJMod.SupportedLanguages = Ice.createTempClass()
    class SupportedLanguages(Ice.EnumBase):

        def __init__(self, _n, _v):
            Ice.EnumBase.__init__(self, _n, _v)

        def valueOf(self, _n):
            if _n in self._enumerators:
                return self._enumerators[_n]
            return None
        valueOf = classmethod(valueOf)

    SupportedLanguages.C = SupportedLanguages("C", 0)
    SupportedLanguages.Cpp = SupportedLanguages("Cpp", 1)
    SupportedLanguages.Java = SupportedLanguages("Java", 2)
    SupportedLanguages.Py = SupportedLanguages("Py", 3)
    SupportedLanguages._enumerators = { 0:SupportedLanguages.C, 1:SupportedLanguages.Cpp, 2:SupportedLanguages.Java, 3:SupportedLanguages.Py }

    _M_ACJudge_Pkg.OJMod._t_SupportedLanguages = IcePy.defineEnum('::OJMod::SupportedLanguages', SupportedLanguages, (), SupportedLanguages._enumerators)

    _M_ACJudge_Pkg.OJMod.SupportedLanguages = SupportedLanguages
    del SupportedLanguages

if '_t_seqString' not in _M_ACJudge_Pkg.OJMod.__dict__:
    _M_ACJudge_Pkg.OJMod._t_seqString = IcePy.defineSequence('::OJMod::seqString', (), IcePy._t_string)

if '_t_seqProblem' not in _M_ACJudge_Pkg.OJMod.__dict__:
    _M_ACJudge_Pkg.OJMod._t_seqProblem = IcePy.defineSequence('::OJMod::seqProblem', (), _M_ACJudge_Pkg.OJMod._t_Problem)

if '_t_seqResults' not in _M_ACJudge_Pkg.OJMod.__dict__:
    _M_ACJudge_Pkg.OJMod._t_seqResults = IcePy.defineSequence('::OJMod::seqResults', (), _M_ACJudge_Pkg.OJMod._t_Results)

_M_ACJudge_Pkg.OJMod._t_Coms = IcePy.defineValue('::OJMod::Coms', Ice.Value, -1, (), False, True, None, ())

if 'ComsPrx' not in _M_ACJudge_Pkg.OJMod.__dict__:
    _M_ACJudge_Pkg.OJMod.ComsPrx = Ice.createTempClass()
    class ComsPrx(Ice.ObjectPrx):

        def fetch(self, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_fetch.invoke(self, ((), context))

        def fetchAsync(self, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_fetch.invokeAsync(self, ((), context))

        def begin_fetch(self, _response=None, _ex=None, _sent=None, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_fetch.begin(self, ((), _response, _ex, _sent, context))

        def end_fetch(self, _r):
            return _M_ACJudge_Pkg.OJMod.Coms._op_fetch.end(self, _r)

        def test(self, sourceCode, lang, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_test.invoke(self, ((sourceCode, lang), context))

        def testAsync(self, sourceCode, lang, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_test.invokeAsync(self, ((sourceCode, lang), context))

        def begin_test(self, sourceCode, lang, _response=None, _ex=None, _sent=None, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_test.begin(self, ((sourceCode, lang), _response, _ex, _sent, context))

        def end_test(self, _r):
            return _M_ACJudge_Pkg.OJMod.Coms._op_test.end(self, _r)

        def submit(self, sourceCode, lang, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_submit.invoke(self, ((sourceCode, lang), context))

        def submitAsync(self, sourceCode, lang, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_submit.invokeAsync(self, ((sourceCode, lang), context))

        def begin_submit(self, sourceCode, lang, _response=None, _ex=None, _sent=None, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_submit.begin(self, ((sourceCode, lang), _response, _ex, _sent, context))

        def end_submit(self, _r):
            return _M_ACJudge_Pkg.OJMod.Coms._op_submit.end(self, _r)

        def testWithID(self, ProblemID, sourceCode, lang, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_testWithID.invoke(self, ((ProblemID, sourceCode, lang), context))

        def testWithIDAsync(self, ProblemID, sourceCode, lang, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_testWithID.invokeAsync(self, ((ProblemID, sourceCode, lang), context))

        def begin_testWithID(self, ProblemID, sourceCode, lang, _response=None, _ex=None, _sent=None, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_testWithID.begin(self, ((ProblemID, sourceCode, lang), _response, _ex, _sent, context))

        def end_testWithID(self, _r):
            return _M_ACJudge_Pkg.OJMod.Coms._op_testWithID.end(self, _r)

        def submitWithID(self, ProblemID, sourceCode, lang, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_submitWithID.invoke(self, ((ProblemID, sourceCode, lang), context))

        def submitWithIDAsync(self, ProblemID, sourceCode, lang, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_submitWithID.invokeAsync(self, ((ProblemID, sourceCode, lang), context))

        def begin_submitWithID(self, ProblemID, sourceCode, lang, _response=None, _ex=None, _sent=None, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_submitWithID.begin(self, ((ProblemID, sourceCode, lang), _response, _ex, _sent, context))

        def end_submitWithID(self, _r):
            return _M_ACJudge_Pkg.OJMod.Coms._op_submitWithID.end(self, _r)

        def problemDescription(self, ProblemID, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_problemDescription.invoke(self, ((ProblemID, ), context))

        def problemDescriptionAsync(self, ProblemID, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_problemDescription.invokeAsync(self, ((ProblemID, ), context))

        def begin_problemDescription(self, ProblemID, _response=None, _ex=None, _sent=None, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_problemDescription.begin(self, ((ProblemID, ), _response, _ex, _sent, context))

        def end_problemDescription(self, _r):
            return _M_ACJudge_Pkg.OJMod.Coms._op_problemDescription.end(self, _r)

        def languageOptions(self, problemID, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_languageOptions.invoke(self, ((problemID, ), context))

        def languageOptionsAsync(self, problemID, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_languageOptions.invokeAsync(self, ((problemID, ), context))

        def begin_languageOptions(self, problemID, _response=None, _ex=None, _sent=None, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_languageOptions.begin(self, ((problemID, ), _response, _ex, _sent, context))

        def end_languageOptions(self, _r):
            return _M_ACJudge_Pkg.OJMod.Coms._op_languageOptions.end(self, _r)

        def listProblems(self, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_listProblems.invoke(self, ((), context))

        def listProblemsAsync(self, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_listProblems.invokeAsync(self, ((), context))

        def begin_listProblems(self, _response=None, _ex=None, _sent=None, context=None):
            return _M_ACJudge_Pkg.OJMod.Coms._op_listProblems.begin(self, ((), _response, _ex, _sent, context))

        def end_listProblems(self, _r):
            return _M_ACJudge_Pkg.OJMod.Coms._op_listProblems.end(self, _r)

        @staticmethod
        def checkedCast(proxy, facetOrContext=None, context=None):
            return _M_ACJudge_Pkg.OJMod.ComsPrx.ice_checkedCast(proxy, '::OJMod::Coms', facetOrContext, context)

        @staticmethod
        def uncheckedCast(proxy, facet=None):
            return _M_ACJudge_Pkg.OJMod.ComsPrx.ice_uncheckedCast(proxy, facet)

        @staticmethod
        def ice_staticId():
            return '::OJMod::Coms'
    _M_ACJudge_Pkg.OJMod._t_ComsPrx = IcePy.defineProxy('::OJMod::Coms', ComsPrx)

    _M_ACJudge_Pkg.OJMod.ComsPrx = ComsPrx
    del ComsPrx

    _M_ACJudge_Pkg.OJMod.Coms = Ice.createTempClass()
    class Coms(Ice.Object):

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::OJMod::Coms')

        def ice_id(self, current=None):
            return '::OJMod::Coms'

        @staticmethod
        def ice_staticId():
            return '::OJMod::Coms'

        def fetch(self, current=None):
            raise NotImplementedError("servant method 'fetch' not implemented")

        def test(self, sourceCode, lang, current=None):
            raise NotImplementedError("servant method 'test' not implemented")

        def submit(self, sourceCode, lang, current=None):
            raise NotImplementedError("servant method 'submit' not implemented")

        def testWithID(self, ProblemID, sourceCode, lang, current=None):
            raise NotImplementedError("servant method 'testWithID' not implemented")

        def submitWithID(self, ProblemID, sourceCode, lang, current=None):
            raise NotImplementedError("servant method 'submitWithID' not implemented")

        def problemDescription(self, ProblemID, current=None):
            raise NotImplementedError("servant method 'problemDescription' not implemented")

        def languageOptions(self, problemID, current=None):
            raise NotImplementedError("servant method 'languageOptions' not implemented")

        def listProblems(self, current=None):
            raise NotImplementedError("servant method 'listProblems' not implemented")

        def __str__(self):
            return IcePy.stringify(self, _M_ACJudge_Pkg.OJMod._t_ComsDisp)

        __repr__ = __str__

    _M_ACJudge_Pkg.OJMod._t_ComsDisp = IcePy.defineClass('::OJMod::Coms', Coms, (), None, ())
    Coms._ice_type = _M_ACJudge_Pkg.OJMod._t_ComsDisp

    Coms._op_fetch = IcePy.Operation('fetch', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (), (), ((), IcePy._t_string, False, 0), ())
    Coms._op_test = IcePy.Operation('test', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), IcePy._t_string, False, 0), ((), _M_ACJudge_Pkg.OJMod._t_SupportedLanguages, False, 0)), (), ((), _M_ACJudge_Pkg.OJMod._t_seqResults, False, 0), ())
    Coms._op_submit = IcePy.Operation('submit', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), IcePy._t_string, False, 0), ((), _M_ACJudge_Pkg.OJMod._t_SupportedLanguages, False, 0)), (), ((), _M_ACJudge_Pkg.OJMod._t_seqResults, False, 0), ())
    Coms._op_testWithID = IcePy.Operation('testWithID', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), IcePy._t_int, False, 0), ((), IcePy._t_string, False, 0), ((), _M_ACJudge_Pkg.OJMod._t_SupportedLanguages, False, 0)), (), ((), _M_ACJudge_Pkg.OJMod._t_seqResults, False, 0), ())
    Coms._op_submitWithID = IcePy.Operation('submitWithID', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), IcePy._t_int, False, 0), ((), IcePy._t_string, False, 0), ((), _M_ACJudge_Pkg.OJMod._t_SupportedLanguages, False, 0)), (), ((), _M_ACJudge_Pkg.OJMod._t_seqResults, False, 0), ())
    Coms._op_problemDescription = IcePy.Operation('problemDescription', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), IcePy._t_int, False, 0),), (), ((), IcePy._t_string, False, 0), ())
    Coms._op_languageOptions = IcePy.Operation('languageOptions', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (((), IcePy._t_int, False, 0),), (), ((), _M_ACJudge_Pkg.OJMod._t_seqString, False, 0), ())
    Coms._op_listProblems = IcePy.Operation('listProblems', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, None, (), (), (), ((), _M_ACJudge_Pkg.OJMod._t_seqProblem, False, 0), ())

    _M_ACJudge_Pkg.OJMod.Coms = Coms
    del Coms

# End of module ACJudge_Pkg.OJMod
